package com.lost.octopus.es.helper.annotation;

import com.lost.octopus.es.helper.entity.query.aggregation.AggregationStrategy;
import com.lost.octopus.es.helper.entity.query.aggregation.NotAggregationStrategy;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 聚合配置
 * @author zhangbh
 * @date 2022/10/8 0008 11:17
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface EsAggregation {

    /**
     * 分组策略，默认不分组
     * @return 策略实现
     */
    Class<? extends AggregationStrategy> when() default NotAggregationStrategy.class;
}
